package com.x.erp.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Service;
import com.x.erp.dao.CityDao;
import com.x.erp.model.City;
import com.x.erp.rpc.CityRpcService;
import com.x.framework.exception.BusinessException;
import com.x.framework.exception.ExceptionCode;
import com.x.framework.service.BaseService;

@Component
@Service(interfaceName = "com.x.erp.rpc.CityRpcService", timeout = 60000)
public class CityService extends BaseService implements CityRpcService {

	@Autowired
	private CityDao cityDao;
	
	@Override
	public List<City> selectCityList(City city) {
		try {
			return cityDao.selectCityList(city);
		} catch (Exception e) {
			throw new BusinessException(ExceptionCode.EXCEPTION_CODE0010, e);
		}
	}

}
